<?php 
/**
* BankPayment
* @author Jesper Saron, Oliver Leisalu
* @package BankLink
*/
final class BankPayment {

	/**
	* User given identification number or text (20 letters long)
	*/
	private $uid;
	/**
	 * Some user data that will be sent back to user when user is coming back from bank. 
	 * Useful to give information that is more complex than just a number.
	 * @var Array
	 */
	private $userData = array();
	/**
	* Order comments in human-readable text form (selgitus)
	*/
	private $description;
	/**
	* Price to be paid
	*/
	private $price;
	/**
	* Currency
	*/
	private $currency = 'EEK'; 
	/**
	* @param String [hansa|seb|sampo|nordea|estcard]
	*/
	private $bank;
	
	
	/**
	* @param Int $ixOrder
	* @param String $txtOrderDescription
	* @param Float $cPrice
	* @param String $nCurrency
	* @param Bool $isSuccessful
	*/
	public function __construct( $uid, $price, $description, $bank, $currency = 'EEK' ) {
		$this->uid = $uid;
		$this->description = $description;
		$this->bank = strtolower($bank);
		$this->price = (float)$price;
		$this->currency = strtoupper($currency);
	}
	
	public function __set( $var, $value ) {
		$this->$var = $value;
	}

	public function __get( $var ) {
		return $this->$var;
	}
	
}
?>